<%@include file="header.jsp" %>
<c:set var="t" value="true" />
	<table class="table table-striped">
		<tr>
			<th>#</th>
			<th><fmt:message key="label.facility.name"></fmt:message></th>
			<th><fmt:message key="label.facility.description"></fmt:message></th>
			<th><fmt:message key="label.facility.type"></fmt:message></th>
			<th><fmt:message key="label.facility.capacity"></fmt:message></th>
			<th>Action</th>
		</tr>
		<c:forEach var="oneFacility" items="${facilities}" varStatus="status">
			<tr>
				<td>${oneFacility.facilityID}</td>
				<td>${oneFacility.facilityName}</td>
				<td>${oneFacility.description}</td>
				<td>${oneFacility.facilityType}</td>
				<td>${oneFacility.capacity}</td>
				<td>
				<c:url var="updurl" scope="page" value="/UpdateFacility.jsp">
					<c:param name="facilityID" value="${oneFacility.facilityID}"/>
	 				<c:param name="facilityname" value="${oneFacility.facilityName}"/>
	                <c:param name="description" value="${oneFacility.description}"/>
	                <c:param name="type" value="${oneFacility.facilityType}"/>
	                <c:param name="capacity" value="${oneFacility.capacity}"/>
                </c:url>
                <c:url var="delurl" scope="page" value="/DeleteFacility">
                	<c:param name="facilityID" value="${oneFacility.facilityID}"/>
                </c:url>
				<div class="btn-group">
					  <button class="btn btn-primary">Action</button>
					  <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
					    <span class="caret"></span>
					  </button>
					  <ul class="dropdown-menu">
					    <li><a href="${updurl}"><fmt:message key="label.facility.edit"/></a></li>
					    <li><a href="${delurl}"><fmt:message key="label.facility.delete"/></a></li>
					  </ul>
				</div>
                </td>
			</tr>
		</c:forEach>
	</table>
	<c:url var="detailurl" scope="page" value="/AddFacility.jsp">
		<c:param name="facilityname" value=""/>
        <c:param name="description" value=""/>
        <c:param name="type" value=""/>
        <c:param name="capacity" value=""/>
	</c:url> 
	<a class="btn btn-primary" href="${detailurl}"><fmt:message key="label.facility.add" /></a>
<%@include file="footer.jsp" %>